<template>
    <div class="searchForGoods">
      <div class="search-header">
        <span class="left_icon fa fa-2x fa-angle-left returnThis" @click="returnLeave"></span>
        <img class="searchIcon" src="../../assets/tubiao/search.png" />
        <input class="searchMall" type="tel" placeholder="保暖内衣">
        <span class="selectBtn">搜索</span>
      </div>
      <div class="search-topSearch">
        <p class="topSearchTitle">热搜</p>
        <ul class="hotSearch">
          <li>保暖内衣</li>
          <li>面膜</li>
          <li>口红</li>
          <li>手表</li>
          <li>保温杯</li>
          <li>洗衣液</li>
          <li>超值大礼包</li>
          <li>华为</li>
          <li>耳机</li>
        </ul>

      </div>
      <div class="search-history">
        <p class="historyTitle">历史搜索
          <img class="deleteData" src="../../assets/删除.png"/></p>
        <ul>
          <li v-for="(item, key) in historyArr" :key="key">{{item}}</li>
        </ul>
      </div>
    </div>
</template>

<script>
  export default {
    name: 'searchForGoods',
    data() {
      return{
        historyArr: ['iphone x', '华为'],
      }
    },
    methods: {
      returnLeave() {
        this.$router.push('/myMall');
      }
    }
  };
</script>

<style scoped>
  *{
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
  }
  .searchForGoods{
    width: 100vw;
    overflow: hidden;
    background: #f3f3f3;
  }
  .search-header{
    width: 100vw;
    height: 60px;
    background: white;
    overflow: hidden;
    border-bottom: 1px solid #f3f3f3;
  }
  .returnThis{
    position: absolute;
    top: 5px;
    left: 23px;
  }
  .searchMall{
    position: absolute;
    top: 10px;
    left: 80px;
    width: 63vw;
    height: 45px;
    background: #f5f5f5;
    border-radius: 10px;
    border: none;
    padding-left: 50px;
    font-size: 20px;
  }
  .searchIcon{
    position: absolute;
    top: 16px;
    left: 90px;
    height: 30px;
    width: 30px;
    z-index: 999;
  }
  .selectBtn{
    font-size: 26px;
    position: absolute;
    top: 15px;
    right: 25px;
    color: #c7c7c7;
  }
  .search-topSearch{
    background: #fff;
    width: 100vw;
    padding-left: 30px;
  }
  .topSearchTitle{
    line-height: 60px;
    font-size: 22px;
  }
  .hotSearch>li{
    border: 1px solid #ccc;
    display: inline-block;
    padding: 10px 20px;
    font-size: 20px;
    margin: 0 20px 20px 0;
    border-radius: 10px;
  }
  .search-history{
    width: 100vw;
    margin-top: 10px;
    background: #fff;
    overflow: hidden;
  }
  .historyTitle{
    line-height: 70px;
    border-bottom: 1px solid #ccc;
    padding-left: 30px;
    position: relative;
    font-size: 22px;
  }
  .deleteData{
    width: 25px;
    position: absolute;
    top: 23px;
    right: 20px;
  }
  .search-history li{
    line-height: 60px;
    border-bottom: 1px solid #ccc;
    padding-left: 30px;
    font-size: 20px;
  }
</style>
